package cn.ssm.biz.impl;

import java.awt.print.Paper;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import cn.ssm.biz.FaultBiz;
import cn.ssm.dao.FaultMapper;
import cn.ssm.pojo.Fault;
import cn.ssm.pojo.Pager;

@Service("FaultBizImpl")
public class FaultBizImpl implements FaultBiz {
	
	@Autowired
	@Qualifier("FaultMapper")
	private FaultMapper faultMapper;

	
	@Override
	public int selectfaultCount() {
		// TODO Auto-generated method stub
		return faultMapper.selectfaultCount();
	}


	@Override
	public List<Fault> faultInfo(Pager pager) {
		// TODO Auto-generated method stub
		int form =(pager.getCurrentPage()-1)*(pager.getRowPerPage());
		return faultMapper.faultInfo(form, pager.getRowPerPage());
	}


	@Override
	public int addfaultInfo(Fault fault) {
		// TODO Auto-generated method stub
		return faultMapper.addfaultInfo(fault);
	}


	@Override
	public int deleteFault(int id) {
		// TODO Auto-generated method stub
		return faultMapper.deleteFault(id);
	}


	@Override
	public List<Fault> faultInfo1() {
		// TODO Auto-generated method stub
		return faultMapper.faultInfo1();
	}


	
	
	
}
